update SolverCore compat and add step_status#297
update SolverCore compat and add step_status#297MaxenceGollier merged 1 commit intoJuliaSmoothOptimizers:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the SolverCore dependency and adds step status tracking to regularization and trust-region optimization solvers. Following the upstream change in SolverCore.jl PR #130, users can now access the step acceptance status (:accepted, :rejected, or :unknown) through the stats object during callbacks and after solver completion.
Changes:
- Updated SolverCore compatibility from 0.3.0 to 0.3.10
- Added
set_step_status!(stats, :accepted)calls when steps are accepted (η1 ≤ ρk < Inf) in all relevant solver algorithms - Added
set_step_status!(stats, :rejected)calls when steps are rejected (ρk < η1 || ρk == Inf) in all relevant solver algorithms - Added test assertions to verify step_status field is properly set for all solver types
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Project.toml | Updated SolverCore compatibility requirement to version 0.3.10 |
| src/TR_alg.jl | Added step status tracking (accepted/rejected) based on reduction ratio ρk |
| src/TRDH_alg.jl | Added step status tracking (accepted/rejected) based on reduction ratio ρk |
| src/R2_alg.jl | Added step status tracking (accepted/rejected) based on reduction ratio ρk |
| src/R2N.jl | Added step status tracking (accepted/rejected) based on reduction ratio ρk |
| src/R2DH.jl | Added step status tracking (accepted/rejected) based on reduction ratio ρk |
| src/LM_alg.jl | Added step status tracking (accepted/rejected) based on reduction ratio ρk |
| src/LMTR_alg.jl | Added step status tracking (accepted/rejected) based on reduction ratio ρk |
| test/runtests.jl | Added assertions to verify step_status is :unknown at iter==0 and :accepted at iter>0 for all solver tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #297 +/- ##
===========================================
+ Coverage 61.53% 83.51% +21.98%
===========================================
Files 11 13 +2
Lines 1292 1656 +364
===========================================
+ Hits 795 1383 +588
+ Misses 497 273 -224 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b20b029
into
JuliaSmoothOptimizers:master
Following JuliaSmoothOptimizers/SolverCore.jl#130,
users can now access the step status in the callback through the
stats.